﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CinemaBookingProject.DBLayer;

public class CtrEmployee
{
    private DBEmployee dbe = new DBEmployee();

    public List<Employee> Read(string fName, string lName, string phoneNo)
    {
        return dbe.Read(fName, lName, phoneNo);
    }

    public int Insert(Employee emp)
    {
        return dbe.Insert(emp);
    }

    public int Delete(int id)
    {
        return dbe.Delete(id);
    }

    public int Update(Employee emp)
    {
        return dbe.Update(emp);
    }
    public Employee EmployeeObject(string phoneNo, string lname, string fname, bool isadmin, int id, bool isactive, List<Booking> bookings)
    {
        Employee emp = new Employee(phoneNo, lname, fname, isadmin, id, isactive);
        emp.Bookings = bookings;
        return emp;
    }
}

